package com.ruoyi.major.mapper;

import com.ruoyi.major.domain.Major;
import org.apache.ibatis.annotations.*;
import java.util.List;

@Mapper
public interface MajorMapper {

    @Select("SELECT * FROM tb_exam_major WHERE id = #{id}")
    Major selectMajorById(Long id);

    @Select("SELECT * FROM tb_exam_major")
    List<Major> selectMajorList();

    @Insert("INSERT INTO tb_exam_major (name) VALUES (#{name})")
    int insertMajor(Major major);

    @Update("UPDATE tb_exam_major SET name = #{name} WHERE id = #{id}")
    int updateMajor(Major major);

    @Delete("DELETE FROM tb_exam_major WHERE id IN (${ids})")
    int deleteMajorByIds(@Param("ids") String ids);
}
